package com.example.demo.practice.innerclass;

import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;

import com.example.demo.practice.AppManager;
import com.example.demo.practice.R;
import com.example.demo.practice.tool.ServerHttp;
import com.example.demo.practice.ui.TitleView;

/**
 * Created by hanbo on 2018-01-11.
 */

public class IBaseActivity extends AppCompatActivity {
    public ServerHttp serverHttp;

    /**
     * 设置标题
     * @param title 标题
     */
    @Override
    public void setTitle(CharSequence title) {
        if(getSupportActionBar()!=null){
            getSupportActionBar().hide();
        }
        TitleView titleView= (TitleView) findViewById(R.id.title);
        titleView.setText((String) title);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

        AppManager.addActivity(this);
    }
}
